<?php
	header('content-type:text/html;charset=utf-8');
	require 'mysqlpublic.php';
	$pic=$_POST['p'];
	$sql="select * from goods";
	$result=mysql_query($sql);
	$row=mysql_num_rows($result);
	$ar=array();
	for($i=0;$i<$row;$i++){
        $sql_arr = mysql_fetch_assoc($result);
		$ar[$i]=array();
		array_push($ar[$i],$sql_arr['imgurl'],$sql_arr['goodname'],$sql_arr['price'],$sql_arr['id']);
	}
	echo json_encode($ar);
?>